/**
 * @file primary_menu.h
 *
 */
#ifndef PRIMARY_MENU_H
#define PRIMARY_MENU_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/

#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lvgl.h"
#include "lv_watch_conf.h"
#else
#include "../../../lvgl/lvgl.h"
#include "../../../lv_watch_conf.h"
#endif

#if USE_LV_WATCH_PRIMARY_MENU != 0

/*********************
 *      DEFINES
 *********************/
#define WATCH_APP_MAX_COUNT  NV_WATCH_MAX_MENU_APP_CNT
/**********************
 *      TYPEDEFS
 **********************/
typedef struct {
    void * img_src;
    watchLangTxtId_t txtId;
    lv_event_cb_t event_cb;
} watch_app_info_t;

typedef enum
{
    APP_SETTING = 0,     //0
    APP_WECHAT,          //1
    APP_PHONEBOOK,       //2
    APP_CAMERA,          //3
    APP_MAKEFRIENDS,     //4
    APP_DIALPAD,         //5
    APP_QRCODE,          //6
    APP_STOPWATCH,       //7
    APP_CALCULATOR,      //8
    APP_SPORT,           //9
    APP_HEARTRATE,       //10
    APP_VIDEOCALL,       //11
    APP_AIKNOWLEDGE,     //12
    APP_CALENDAR,        //13
    APP_BLOODPRESSURE,   //14
    APP_ALBUM,           //15
    APP_ANSWERDQUE,      //16
    APP_BARCODE,         //17
    APP_MUSIC,           //18
    APP_IMGVIEWR,        //19
    APP_QRCODESCAN,      //20
    APP_CALLLOG,         //21
    APP_ALARM,           //22
    APP_COMPASS,         //23
    APP_MESSAGE,         //24
    APP_TIMER,           //25
    APP_EXERCISE,        //26
    APP_SLEEP,           //27
    APP_ELEVATION,       //28
    APP_ACTIVITY,        //29
    APP_EXERCISE_RECORD, //30
    APP_SEARCH_PHONE,    //31
    APP_QQ,              //32
} watch_app_type_t;

/**********************
 * GLOBAL PROTOTYPES
 **********************/

/**
 * Create a primary_menu application
 */
#if USE_LV_WATCH_LAUNCHER != 0
lv_obj_t * primary_menu_create_all(lv_obj_t * tabview);
lv_obj_t * primary_menu_create_one(lv_obj_t * tabview, int8_t menu_id );
lv_obj_t * primary_menu_create(lv_obj_t * tabview, bool create_all, int8_t menu_id );
uint8_t primary_menu_get_menu_cnt(void);
#elif USE_LV_WATCH_LAUNCHER2 != 0
void primary_menu_create(lv_obj_t * activity_obj);
#endif
void primary_menu_init(void);
void primary_menu_destroy(void);

/**********************
 *      MACROS
 **********************/

#endif /*USE_LV_WATCH_PRIMARY_MENU*/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*PRIMARY_MENU_H*/
